<?php

class odcf_debug
{
        public static function debug($texte,$texte2='')
        {
				//pourquoi 2 textes ? le bug est en une ligne pouvoir afficher un texte et un tableau (ou object)
                $tab_trace=debug_backtrace();

                $trace=str_pad($tab_trace[0]['line'],4,' ', STR_PAD_LEFT) . ' ' . basename($tab_trace[0]['file']) . ' -- ';

                //echo "<pre>";print_r($tab_trace);echo "</pre>";
                foreach ($tab_trace as $tab_trace_mini)
                {
                        if (isset($tab_trace_mini['line']))
                        {
                                $trace_detail='  trace ' . str_pad($tab_trace_mini['line'],4,' ', STR_PAD_LEFT) . ' ' . basename($tab_trace_mini['file']) . ' -- ';
                                //error_log($trace_detail);
                        }
                }
                $msg='';
                $msg=print_r($texte,true);
                //si toujours vide 
                if ($msg=='')
                {
                        $msg=$texte;
                }
				
                $msg2='';
                $msg2=print_r($texte2,true);
                //si toujours vide 
                if ($msg2=='')
                {
                        $msg2=$texte2;
                }
				
                $sortie_log=$trace . ' ' . $msg . ' ' . $msg2;


				
				$logger = Zend_Registry::get('LOG')->log($sortie_log, Zend_Log::INFO);
				
                //error_log($msg);

        }
}

?>